home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group99a.txt / 000153_icon-group-sender _Tue Jul 13 12:31:56 1999.msg < prev    next >
Internet Message Format  |  2000-09-20  |  1KB

  1. Return-Path: <icon-group-sender>
  2. Received: (from root@localhost)
  3.     by baskerville.CS.Arizona.EDU (8.9.1a/8.9.1) id MAA10696
  4.     for icon-group-addresses; Tue, 13 Jul 1999 12:30:15 -0700 (MST)
  5. Message-Id: <199907131930.MAA10696@baskerville.CS.Arizona.EDU>
  6. Date: Tue, 13 Jul 1999 09:36:28 -0700 (MST)
  7. From: Gregg Townsend <gmt@baskerville.CS.Arizona.EDU>
  8. To: hgs@dmu.ac.uk
  9. Cc: icon-group@optima.CS.Arizona.EDU
  10. Subject: Re: checking for directory
  11. Errors-To: icon-group-errors@optima.CS.Arizona.EDU
  12. Status: RO
  13.  
  14.     Date: Tue, 13 Jul 1999 12:18:39 +0100 (BST)
  15.     From: Hugh Sasse <hgs@dmu.ac.uk>
  16.     
  17.     I cannot see a function which will allow one to determine if the list of
  18.     names one is reading is due to reading a genuine directory or a file
  19.     produced by 'ls -a > files'.  There seems to be no stat or lstat function.  
  20.  
  21. You can't tell by the file contents, but you can determine whether a
  22. filename s is a directory by checking to see whether open(s || "/.")
  23. succeeds.  This is encapsulated in the directory(s) procedure in the
  24. Icon program library ("link io").  There's no general stat()/lstat()
  25. function, though.
  26.  
  27.    ---------------------------------------------------------------------------
  28.    Gregg Townsend         Staff Scientist      The University of Arizona
  29.    gmt@cs.arizona.edu     Computer Science     Tucson, Arizona, USA
  30.